/**
 * @param {string} path
 * @return {string}
 */
 var simplifyPath = function(path) {
    let arr = path.split('/')
    let stack = []
    for(let name of arr){
        if(name == '..'){
            stack.length&&stack.pop()
        }else {
            name.length&&name!='.'&&stack.push(name)
        }
    }
    return '/'+stack.join('/')
};